package com.redlight.base;

/**
 * Created by chao on 2019/1/9.
 */
public enum ResultStatus {
    OK(true, "10000", "操作成功"),
    FAIL(false, "9000", "系统异常"),
    INVALID_CLIENTID(false, "30003", "Invalid clientid"),
    ACCOUNT_BLANK(false, "30004", "登录名不能为空"),
    PASSWORD_BLANK(false, "30004", "密码不能为空"),
    INVALID_PASSWORD(false, "30004", "用户名或密码错误"),
    INVALID_CAPTCHA(false, "30005", "验证码错误"),
    ACCOUNT_DENIED(false, "30006", "账号已禁用"),
    INVALID_TOKEN(false, "30009", "登录信息已失效");

    private boolean success;
    private String code;
    private String message;

    private ResultStatus(boolean _success, String _code, String _message) {
        this.success = _success;
        this.code = _code;
        this.message = _message;
    }

    public boolean isSuccess() {
        return this.success;
    }

    public String getMessage() {
        return this.message;
    }

    public String getCode() {
        return this.code;
    }
}
